$(function () {
    $(".tab .t a").hover(function(){
		$(this).addClass('active').siblings().removeClass('active');
		var i = $(this).index(); $(".c").eq(i).addClass('active').siblings().removeClass('active');
	})
	var slide = new Swiper('.slide .swiper-container', {
		pagination: '.pagination',
		loop: true,
		autoplay : 5000,
		paginationClickable: true,
		calculateHeight: true,
		grabCursor: true,
		slidesPerView: 1
	});
	if($(window).width() <= 1200){
		var zj = new Swiper('.swiper-container.zj', {
			loop: true,
			speed: 2500,
			slidesPerView: 3,
			spaceBetween: 50,
			mode: 'vertical'
			//centeredSlides : true,
			//watchSlidesProgress : true
		})
		$('.arrow-left').on('click', function(e){
			e.preventDefault();
			zj.swipePrev();
		})
		$('.arrow-right').on('click', function(e){
			e.preventDefault();
			zj.swipeNext();
		})
	}else{
		var zj = new Swiper('.swiper-container.zj', {
			loop: true,
			speed: 2500,
			slidesPerView: 3,
			spaceBetween: 50,
			//centeredSlides : true,
			//watchSlidesProgress : true
		})
		$('.arrow-left').on('click', function(e){
			e.preventDefault();
			zj.swipePrev();
			if(zj.activeLoopIndex == 0){
				$(this).css({
					'opacity' : '.8',
					'cursor' : 'not-allowed'
				});
			}else {
				$(this).css({
					'opacity' : '1',
					'cursor' : 'pointer'
				});
			}
		})
		$('.arrow-right').on('click', function(e){
			e.preventDefault();
			zj.swipeNext();
			if(zj.activeLoopIndex > 0 &&  zj.activeLoopIndex < 65){
				$(this).css({
					'opacity' : '1',
					'cursor' : 'pointer'
				});
				$(this).prev().css({
					'opacity' : '1',
					'cursor' : 'pointer'
				});
			}else {
				$(this).css({
					'opacity' : '.8',
					'cursor' : 'not-allowed'
				});
			}
		})
	}
	
	//新闻框从右侧划入
	$('.zxcenter').addClass('in');

})